//
//  LGFamilyMinTreeViewController.m
//  ligenyun
//
//  Created by Mac on 2018/4/9.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGFamilyMinTreeViewController.h"
#import "LGTreeView.h"
#import "LGCiTangZuPuAddPeopleViewController.h"
@interface LGFamilyMinTreeViewController ()

@end

@implementation LGFamilyMinTreeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的家庭树";
    [self configSubView];
    // Do any additional setup after loading the view.
}
#pragma mark --subView
- (void)configSubView{
    UIView * header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, 40)];
    header.backgroundColor = self.tableView.backgroundColor;
    __weak typeof(self) weakSelf =  self;
    LGTreeView * tree = [[LGTreeView alloc] initWithFrame:CGRectMake(0, 20, 65, 119)];
    tree.centerX = UIScreenWidth / 2;
    [tree setClicAction:^(UIButton *sender) {
        [weakSelf onSelctedGenerationButton];
    }];
    header.height = tree.height;
    [header addSubview:tree];
    self.tableView.tableHeaderView = header;
    
    
}
- (void)onSelctedGenerationButton{
    [self presentViewController:[LGCiTangZuPuAddPeopleViewController new] animated:NO completion:nil];
}

@end
